﻿@using EcBlog.Properties
@using Recaptcha
@model EcBlog.Models.ContactViewModel

 
@section nav{
   @Html.Partial("_Navigation")
}
@section header{
   @Html.Partial("_Header")
}
@section extra{
   @Html.Partial("_Extra")
}
@section footer{
   @Html.Partial("_Footer")
}
@section head{
   @Html.Partial("_Head")
}

@{ Html.EnableClientValidation(); }
@using (Html.BeginForm("Contact", "Blog", FormMethod.Post))
{
   @Html.ValidationSummary(true)
    <table>
        <thead><tr><td colspan="2">@ViewBag.ContactMessage</td></tr></thead>
        <tr>
            <td style="width: 10%;">
                <div class="editor-label" style="text-align: right;">
                    @Html.LabelFor(model => model.Name)
                </div>
            </td>
            <td>
                <div class="editor-field">
                    @Html.TextBoxFor(model => model.Name, new { @style = "width: 200px;" })
                    @Html.ValidationMessageFor(model => model.Name)
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="editor-label" style="text-align: right;">
                    @Html.LabelFor(model => model.Email)
                </div>
            </td>
            <td>
                <div class="editor-field">
                    @Html.TextBoxFor(model => model.Email, new { @style = "width: 200px;" })
                    @Html.ValidationMessageFor(model => model.Email)
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="editor-label" style="text-align: right;">
                    @Html.LabelFor(model => model.Title)
                </div>
            </td>
            <td>
                <div class="editor-field">
                    @Html.TextBoxFor(model => model.Title, new { @style = "width: 200px;" })
                    @Html.ValidationMessageFor(model => model.Title)
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="editor-label" style="text-align: right;">
                    @Html.LabelFor(model => model.Message)
                </div>
            </td>
            <td>
                <div class="editor-field">
                    @Html.TextAreaFor(model => model.Message, new { @style = "width: 70%; height:250px;" })
                    @Html.ValidationMessageFor(model => model.Message)
                </div>
            </td>
        </tr>
        <tr>
            <td>
                    
            </td>
            <td><div style="width:70%">
                    @Html.Raw(Html.GenerateCaptcha("captcha", "clean"))
                    @Html.ValidationMessage("captcha")</div>
            </td>
        </tr>
    </table>
   <p>
       <b>@ViewBag.Status</b>
   </p>
   <p>
       <input type="submit" value="@ModelLocalization.Send" />
   </p>

}
